package com.example.mybatis.controller;

import com.example.mybatis.bean.AnnualPlan;

import com.example.mybatis.service.AnnualPlanService;
import com.example.mybatis.utils.ResultUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("annualPlan")
public class AnnualPlanController {
    @Resource
    AnnualPlanService annualPlanService;

    @RequestMapping("selectList")
    public ResultUtil selectList(String theme ){
        return annualPlanService.selectList(theme);
    }

    @RequestMapping("save")
    public ResultUtil save(AnnualPlan annualPlan){
        return annualPlanService.save(annualPlan);
    }

    @RequestMapping("update")
    public ResultUtil update(AnnualPlan annualPlan){
        return annualPlanService.update(annualPlan);
    }

    @RequestMapping("removeById")
    public ResultUtil removeById(Integer id){
        return annualPlanService.removeById(id);
    }

    @RequestMapping("getById")
    public ResultUtil getById(Integer id){
        return annualPlanService.getById(id);
    }

}
